
switch_visible=function(id) {
  element=document.getElementById(id);
  if (element.style.display == "none") {
    element.style.display = "";
  } else {
    element.style.display = "none";
  }
}

$(question_new).replaceWith('<%=j render partial: 'questions/question', locals: {question: @question, render_with_js: true} %>');
<% if !@question_type_changed %>
  $(append_question).css("display", "");
<% end %>
